package xyz.suancaiyu.test;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * 5.1 FactoryBean 的使用
 *
 * @author puruidong
 * @version 2019/3/7 21:30
 */
public class Main {

    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("xyz/suancaiyu/test/test.xml");
        Car bean = (Car) context.getBean("car");
        System.out.println(bean.getBrand());
        System.out.println(bean.getMaxSpeed());
        System.out.println(bean.getPrice());
    }

}
